<?php
/**
 * Set methods for use operation in dbtable.
 * 
 * This is a class generated with Zend_CodeGenerator.
 * 
 * @category ###CATEGORY###
 * @package ###PACKAGE###
 * @subpackage ###SUBPACKAGE###
 * @version $Id$
 * @license New BSD
 */


class User_Model_RolesMapper extends Core_Model_Mapper_Abstract
{

    protected $_dbName = 'User_Model_DbTable_Roles';

    /**
     * Add new role to base
     * @param User_Model_Roles $role
     * @return bool
     */
    public function addRole(User_Model_Roles $role)
    {
        $newRow = $this->getDbTable()->createRow();

        $newRow->role = $role->getRole();
        $newRow->parent_id = $role->getParent_id();

        return $newRow->save();
    }
}

